From: Sam Hewitt Date: Mon, 13 May 2024 15:40:35 +0000 (-0230) Subject: style: New window-icon class to split it from icon-dropshadow X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~226^2^2~173 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=6fee2c24e3d45d4f025409fad2edd550c3b626cf;p=gnome-shell.git style: New window-icon class to split it from icon-dropshadow - new class for window icons in window picker - move HC specific styles to this new class Fixes: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/507 Part-of: --- diff --git a/data/theme/gnome-shell-sass/widgets/_base.scss b/data/theme/gnome-shell-sass/widgets/_base.scss index 7d6f2809e..20a1666e2 100644 --- a/data/theme/gnome-shell-sass/widgets/_base.scss +++ b/data/theme/gnome-shell-sass/widgets/_base.scss @@ -18,10 +18,5 @@ @if $contrast == 'high' { icon-shadow: none; - background-color: $osd_bg_color; - padding: $base_padding * 2; - border-radius: $modal_radius; - border: 2px solid $hc_inset_color; - margin: $base_padding * 3; } } diff --git a/data/theme/gnome-shell-sass/widgets/_window-picker.scss b/data/theme/gnome-shell-sass/widgets/_window-picker.scss index c500a0af7..75626633f 100644 --- a/data/theme/gnome-shell-sass/widgets/_window-picker.scss +++ b/data/theme/gnome-shell-sass/widgets/_window-picker.scss @@ -7,6 +7,19 @@ $window_close_button_color: transparentize(lighten($system_bg_color, 7%), .02); spacing: $base_padding; } +// Window icons +.window-icon { + // styled only with .icon-dropshadow + // but has a different style in high-contrast + @if $contrast == 'high' { + background-color: $osd_bg_color; + padding: $base_padding * 2; + border-radius: $modal_radius; + border: 2px solid $hc_inset_color; + margin: $base_padding * 3; + } +} + // Window titles .window-caption { @extend %tooltip; diff --git a/js/ui/windowPreview.js b/js/ui/windowPreview.js index d865e6e25..b98079b28 100644 --- a/js/ui/windowPreview.js +++ b/js/ui/windowPreview.js @@ -133,6 +133,7 @@ export const WindowPreview = GObject.registerClass({ const tracker = Shell.WindowTracker.get_default(); const app = tracker.get_window_app(this.metaWindow); this._icon = app.create_icon_texture(ICON_SIZE); + this._icon.add_style_class_name('window-icon'); this._icon.add_style_class_name('icon-dropshadow'); this._icon.set({ reactive: true,